using System;
using System.Collections.Generic;
using System.Text;
using ERP.BusinessEntities.Base;
using ERP.DAL.Factory;
using System.Data;
namespace ERP.BusinessEntities
{

	public class ICProductsController:BaseBusinessController
	{
		public ICProductsController()
		{
			dal = FactoryDal.CreateEndDal("ICProducts");
		}

        public ICProductsInfo GetObjectByNo(String strNo)
        {
            String strQuery = String.Format(@"SELECT * FROM ICProducts WHERE AAStatus = 'Alive'
                                                    AND No = '{0}'", strNo);

            DataSet ds = GetDataset(strQuery);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                return (ICProductsInfo)GetObjectFromDataRow(ds.Tables[0].Rows[0]);

            return null;
        }
	}
}
